<template>
    <view class="goods-activity flex justify-between items-center text-white">
        <slot name="price"></slot>

        <view class="goods-activity__time flex items-center" v-if="activity && activity.endTime">
            <text class="text-xs">活动剩余</text>
            <count-down
                color="#ff2735"
                bg-color="#FFE0E0"
                :time-end="activity.endTime || ''"
            />
        </view>
    </view>
</template>

<script lang="ts" setup>
import CountDown from "@/components/count-down/count-down.vue";

defineProps({
    activity: {
        type: Object,
        default: () => ({}),
    }
});
</script>

<style lang="scss" scoped>
.goods-activity {
  padding: 0 20rpx;
  height: 100rpx;
  background-color: $u-type-primary;
}
</style>